<?php
/**
 * 入口文件
 * 1 定义路径
 * 2 定义自动加载类
 */

define('GOODCMS', realpath('./'));
define('CORE', GOODCMS . '/core');
define('APP', GOODCMS . '/app');
define( MODULE , '\app');
include 'vendor/autoload.php';
define('DEBUG', true);

if (DEBUG) {
	$whoops = new \Whoops\Run;
	$whoops->pushHandler(new \Whoops\Handler\PrettyPageHandler);
	$whoops->register();
	ini_set('display_errors', 'On');
} else {
	ini_set('display_errors', 'Off');
}

include CORE . '/common/function.php';

include CORE.'/goodcms.php';
//当new对应的类不存在，即无法实例化对象时会出发以下这个方法，自动加载
spl_autoload_register('\core\goodcms::load');

\core\goodcms::run();


















